package com.example.opentransaction.controller;

import com.example.opentransaction.domain.User;
import com.example.opentransaction.service.Change2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/change2")
public class Test2Controller {
    @Autowired
    private Change2Service change2Service;

    @GetMapping("/t1")
    public User find(Integer userId){
        return change2Service.find(userId);
    }

    @PostMapping("/t2")
    public String selTest(Integer userId){
        return change2Service.selTest(userId);
    }

}
